<%@ page import="com.okaysoft.ofb.Task" %>
<!doctype html>
<html>
<head>
    <title>任务信息</title>
    <link rel="stylesheet" href="${resource(dir: 'css', file: 'easyui/easyui.css')}" type="text/css">
    <link rel="stylesheet" href="${resource(dir: 'css', file: 'easyui/icon.css')}" type="text/css">
    <link rel="stylesheet" href="${resource(dir: 'css', file: 'webview.css')}" type="text/css">
 %{--   <g:javascript src="jquery.js"/>
    <g:javascript src="jquery.easyui.min.js"/>
    <g:javascript src="easyui-lang-zh_CN.js"/>
    <script>
    $(function(){
        $(".task-complete-btn").click(function(){
            var t = $(this);
            var url = t.attr("rel");
            var remark = $("#remark").val();
            $.post(url,{result:remark},function(data){
                   if(data.status == '1'){
                       $("#msg").html('提交成功');
                       $(".task-complete-btn").hide();
                       $("#msg").show();
                       return;
                   }
                    $("#msg").html('提交失败');
                    $("#msg").show();
            },'json')
        })
    })
    </script>--}%
</head>
<body>
<div id="Info">
   
        <div id="msg" style="border: 1px solid #CAD9EA;padding: 3px;color:red;">${msg}</div>
    

   %{-- <table id="TaskInfo">
        <tr><th>任务类型</th><td>${task?.type?.label}</td></tr>

        <g:if test="${task?.type == Task.Type.JUMPING}">
        <g:set var="pair" value="${task?.pair?task?.pair.tokenize('|'):[]}"/>
        <tr><th>主干端子</th><td>${pair?pair[0]:''} </td>
        <tr><th>配线端子</th><td>${pair?pair[1]:''}</td></tr>
        </g:if>
        <tr><th>备　　注</th><td>${task?.description}</td></tr>
        <tr><th>完成情况</th><td><textarea id="remark">${task?.result}</textarea></td></tr>
    </table>
    <div style="margin:10px 0;">
        <g:if test="${task?.status == Task.Status.NOTCOMPLETE}">
        <a href="javascript:void(0)" rel="${createLink(action: 'taskComplete',controller: 'api',id:task?.id)}" class="task-complete-btn easyui-linkbutton" >完成任务</a>
        </g:if>
    </div>

</div>
--}%
</body>
</html>